#!/bin/bash
# @author shalousun
# shell script to build docker images while use jenkins.

CUR_PATH=$(cd `dirname $0`;pwd)

if [ -d "$CUR_PATH/$1" ]
then
    mvn clean install -DskipTests -pl :$1 -am
    echo "INFO: build path is $CUR_PATH/$1"
    cd $CUR_PATH/$1/
    mvn clean package -DskipTests dockerfile:push
fi